package cc.yugu.yhdw.webserver.service.basic;

import cc.yugu.yhdw.common.domain.basic.CustomerInOutMoney;
import cc.yugu.yhdw.common.entity.pagination.Page;
import cc.yugu.yhdw.webserver.persistence.basic.CustomerInOutMoneyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 客户资金流水业务
 * 
 * @Date:Created in 2018/7/3 15:10
 * @Author:
 * @Modified By: zjn 2018/7/3 15:10
 */ 
@Service
public class CustomerInOutMoneyService {

    @Autowired
    CustomerInOutMoneyMapper customerInOutMoneyMapper;
    /**
    * 分页查询
    *
    * @Param: [search]
    * @Return: cc.yugu.yhdw.common.entity.pagination.Page
    * @Author By: zjn 2018/7/3  15:11
    */ 
    public Page findPage(CustomerInOutMoney search) {
        Page page = search.buildPage();
        page.setTotalItems(customerInOutMoneyMapper.findPageCount(search));
        search.setBeginIndex(page.getOffset());
        page.setResult(customerInOutMoneyMapper.findPageResult(search));

        return page;
    }
}
